<form method="post" action="index.php?p=feedbacksent" id="fform">
    <fieldset>
        <legend>Ask for feedback</legend>
        <div class="clearfix">
            <label for="xlInput">I did</label>
            <div class="input">
                <textarea required="required" name="description" id="description"></textarea>
            </div>
        </div>
        <div class="clearfix">
            <label for="xlInput">Job category</label>
            <div class="input">
                <select name="category" id="category">
                    <?php
                        //require_once("mysql.config.php");
                        //$db = new DataBase($db_address, $db_username, $db_password, $db);
                        //$db = new Database("localhost", "root", "asdasd", "hiveme");
                        $db->cleanResult();
                        $db->select("categories","*");
                        $cats = $db->getResult();
                        
                        foreach ($cats as $cat) {
                            echo "<option value=\"".$cat['id']."\">".$cat['name']."</option>";
                        }
                    ?>
                </select>
            </div>
        </div>
        <div class="clearfix">
            <label for="xlInput">On</label>
            <div class="input">
                <input name="date" id="date" type="text" value="<?php echo date("Y-m-d");?>"/>
            </div>
        </div>
        <div class="clearfix">
            <label for="xlInput"></label>
            <div class="input">
                <!--<a class="btn primary" href="friends.php" id="sendAsk" rel="facebox">Select persons</a>-->
                <select required="required" name="persons[]" id="persons" multiple="multiple">
                    <?php
                        $db->cleanResult();
                        $db->select("users","*");
                        $users = $db->getResult();
                        
                        foreach ($users as $luser) {
                            if ($luser['id'] != $_SESSION['uid'])
                                echo "<option  value=\"".$luser['id']."\">".$luser['name']." ".$luser['surname']."</option>";
                        }
                    ?>
                </select>
            </div>
        </div>
        <div class="actions">
            <input type="submit" id="submit" class="btn success" value="Send">&nbsp;<button type="reset" class="btn">Cancel</button>
          </div>
    </fieldset>
</form>
<div id="waiting"></div>
<div id="message"></div>